{% props code = '', height = null %}

<div
    class="IconModal__code"
    data-controller="clipboarder"
>
    {% set _code -%}
        {% block content -%}
            {{ code ? code|trim|raw }}
        {%- endblock -%}
    {%- endset %}

    <pre
        {% if height %} style="--height: {{ height }}" {% endif %}
        data-clipboarder-target="source"
    ><code>{{ _code ? _code|trim|raw : code }}</code></pre>

    <button class="btn btn-sm IconModalcopy" data-action="clipboarder#copy" data-clipboarder-target="button">
        <twig:ux:icon name="copy" />
    </button>
</div>
